{Home}

What is it with me and scripts?


I seem fascinated by scripts and programming languages -- I'm happiest when I'm making up a little scripting language to drive something.  There are a few examples within this web site.  My DesignatureApl.class Java program is driven by a script:
"nostrokes;rgb:255,0,0;strokes:-10,-9,-8,-7,-6,-5,-4;wait:50;rgb:0,255,0;strokes:-3,-2,-1,1,2;wait:50;
  rgb:0,0,255;strokes:3,4,5,6;wait:50;rgb:0,0,0;strokes:7,8,9,10;wait,50;spin;wait:50;rgb:0,0,0;
  allstrokes;label;spin;loop"
and then there's the Plotter (todo) and LEDGrid classes too, each driven by their own (different) script:
"The;quick;brown;fox;jumps;over;the;lazy;dog;:"

While I was at University, I even invented my own programming language, "SLANG".   This was quite a long time ago you understand.  In fact, it (the SLANG interpreter) was developed using punched cards and I distinctly recall getting its output from a mighty IBM chain line-printer.  The language was a bit of a stretch, slightly artificial, but it was fun playing around with it.  I'm a quite vague about the details, but the idea with it was that each SLANG source line started with an optional numeric tag.  There were the usual control statements line if, for and while etc but a particular line would only be executed if its tag was turned on.  Multiple lines could share a tag.

So, in the following code, tags 12 and 14 are cleared and then either one is set by the if.  If SomeFlag is true, 12 is set, and as the while loop is executed only lines tagged with 12 (blue) will be executed...

    CLEAR 12, 14
    IF (SomeFlag) THEN SET 12 ELSE SET 14
    WHILE (Thing)
 14   a
 14   b
 14   c
 12   d
 14   e
 12   f
 12   g
 14   h
      i 
    END
You see what I mean?  A bit of a stretch, but I suppose it might suit some applications.

Why the fascination?  Perhaps it's an extension of the control aspect of my theory of Programming's appeal.